"""
线索池页面类
"""
from ..base_page import BasePage
from selenium.webdriver.common.by import By
from selenium.webdriver.support.select import Select

class CluePollPage(BasePage):
    #数据
    url="/crm/index.php?m=leads&a=index&by=public"
    #定位器
    clue_poll_locator=(By.LINK_TEXT,"线索池")
    fp_clue_locator = (By.LINK_TEXT, "分配")
    lq_clue_locator = (By.LINK_TEXT, "领取")
    tips_fp_clue_locator = (By.XPATH, "/html/body/div[9]/div[1]/span")
    tips_lq_clue_locator = (By.XPATH, "/html/body/div[5]/div[2]")

    #方法
    def clue_poll(self):
        self.click(self.clue_poll_locator)
    def fp_clue(self):
        self.click(self.fp_clue_locator)
    def lq_clue(self):
        self.click(self.lq_clue_locator)
    def tips_fp_clue(self):  #断言分配线索
        return self.find_element(self.tips_fp_clue_locator).text
    def tips_lq_clue(self):   #断言领取线索
        return self.find_element(self.tips_lq_clue_locator).text

